package com.easylinkin.linkappapi.device.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * 设备模块划分表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("linkapp_device_model")
@ApiModel(description = "设备模块划分实体类")
public class DeviceModel extends Model<DeviceModel> implements Serializable {

  /**
   * id
   */
  @TableId(value = "auto_id",type = IdType.AUTO)
  @ApiModelProperty(value = "主键ID", required = true, example = "")
  private Long autoId;

  /**
   * 设备编码
   */
  @TableField("code_")
  @Length(max = 32, message = "code超长")
  @ApiModelProperty(value = "设备编码", required = true, example = "")
  private String code;

  /**
   * 模块id，0为环境模块,-1为配电箱
   */
  @TableField("model_id_")
  @ApiModelProperty(value = "模块id", required = true, example = "")
  private Integer modelId;

  /**
   * 预留字段备注
   */
  @TableField("remark_")
  @ApiModelProperty(value = "备注", required = false, example = "")
  private String remark;

  @TableField("tenant_id")
  private String tenantId;

  /**
   * 是否从设备模块已移除 0未移除 1已移除
   */
  @TableField("is_remove_")
  @ApiModelProperty(value = "是否从设备模块已移除 0未移除 1已移除", required = true, example = "0")
  private Integer removeStatus;

  /**
   * 环境管理区域id
   */
  @TableField("environmental_area_id")
  @ApiModelProperty(value = "环境管理区域id", required = false, example = "")
  private Integer environmentalAreaId;

}
